﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Smart.Model
{
    /// <summary>
    /// Public Service inteface. This interface represent service contractor.
    /// </summary>
    [ServiceContract]
    public interface IMembership
    {
        /// <summary>
        /// Define all public service methods here
        /// </summary>

        #region Membership

        [OperationContract]
        List<User> GetUsers();

        [OperationContract]
        bool ValidateUser(string email, string password);

        [OperationContract]
        User UpdateUser(User user);

        [OperationContract]
        User RegisterUser(User user);

        [OperationContract]
        User GetUserByEmail(string email);

        [OperationContract]
        User GetUserById(int userId);

        #endregion
    }

    #region Composite Types

    /// <summary>
    /// Define all Composite types here
    /// </summary>

    #region Example for Composite Type

    [DataContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";

        [DataMember]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }
    }

    #endregion

    #endregion
}
